﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BaseUi
{
    /// <summary>
    /// json配置文件
    /// </summary>
    public class JsConfig
    {
        /// <summary>
        /// 传感器上限
        /// </summary>
        public List<int> USensor { get; set; }
        /// <summary>
        /// 传感器下限
        /// </summary>
        public List<int> DSensor { get; set; }
        /// <summary>
        /// HZ上限
        /// </summary>
        public int UHZ { get; set; }
        /// <summary>
        /// HZ下限
        /// </summary>
        public int DHZ { get; set; }
        /// <summary>
        /// HA上限
        /// </summary>
        public int UUA{ get; set; }
        /// <summary>
        /// UA下限
        /// </summary>
        public int DUA { get; set; }
        /// <summary>
        /// LCDCLK上限
        /// </summary>
        public int ULCDCLK { get; set; }
        /// <summary>
        /// LCDCLK下限
        /// </summary>
        public int DLCDCLK { get; set; }
        /// <summary>
        /// VCC上限
        /// </summary>
        public int UVCC { get; set; }
        /// <summary>
        /// VCC下限
        /// </summary>
        public int DVCC { get; set; }
        /// <summary>
        /// VDD上限
        /// </summary>
        public int UVDD { get; set; }
        /// <summary>
        /// VDD下限
        /// </summary>
        public int DVDD { get; set; }
        /// <summary>
        /// GND上限
        /// </summary>
        public int UGND { get; set; }
        /// <summary>
        /// GND下限
        /// </summary>
        public int DGND { get; set; }
        /// <summary>
        /// SW上限
        /// </summary>
        public int USW { get; set; }
        /// <summary>
        /// SW下限
        /// </summary>
        public int DSW { get; set; }
        /// <summary>
        /// LCDDAT上限
        /// </summary>
        public int ULCDDAT { get; set; }
        /// <summary>
        /// LCDDAT下限
        /// </summary>
        public int DLCDDAT { get; set; }
        /// <summary>
        /// NON上限
        /// </summary>
        public int UNON { get; set; }
        /// <summary>
        /// NON下限
        /// </summary>
        public int DNON { get; set; }
        /// <summary>
        /// LCDSTB上限
        /// </summary>
        public int ULCDSTB { get; set; }
        /// <summary>
        /// LCDSTB下限
        /// </summary>
        public int DLCDSTB { get; set; }
        /// <summary>
        /// 复查次数1
        /// </summary>
        public int number1 { get; set; }
        /// <summary>
        /// 复查次数2
        /// </summary>
        public int number2 { get; set; }
        /// <summary>
        /// 复查次数3
        /// </summary>
        public int number3 { get; set; }
        /// <summary>
        /// mysql链接字符串
        /// </summary>
        public string MySql { get; set; }
        /// <summary>
        /// api地址
        /// </summary>
        public string Api { get; set; }
        /// <summary>
        /// 电气串口串口地址
        /// </summary>
        public string Electric { get; set; }
        /// <summary>
        /// 电气通信地址
        /// </summary>
        public ushort Address { get; set; }
        /// <summary>
        /// 切换1串口地址
        /// </summary>
        public string Change1 { get; set; }
        /// <summary>
        /// 切换2串口地址
        /// </summary>
        public string Change2 { get; set; }
        /// <summary>
        /// 视觉1串口地址
        /// </summary>
        public string Vision1 { get; set; }
        /// <summary>
        /// 视觉1串口地址
        /// </summary>
        public string Vision2 { get; set; }
        /// <summary>
        /// 测试1号串口地址
        /// </summary>
        public string Text1 { get; set; }
        /// <summary>
        /// 测试2号串口地址
        /// </summary>
        public string Text2 { get; set; }
        /// <summary>
        /// 测试3号串口地址
        /// </summary>
        public string Text3 { get; set; }
        /// <summary>
        /// 测试4号串口地址
        /// </summary>
        public string Text4 { get; set; }
        /// <summary>
        /// 是否按压
        /// </summary>
        public bool IsAn { get; set; }

        /// <summary>
        /// 安普板1地址（10进制）
        /// </summary>
        public int Amp1 { get; set; }
        /// <summary>
        /// 安普板2地址（10进制）
        /// </summary>
        public int Amp2 { get; set; }
        /// <summary>
        /// 安普板3地址（10进制）
        /// </summary>
        public int Amp3 { get; set; }
        /// <summary>
        /// 安普板4地址（10进制）
        /// </summary>
        public int Amp4 { get; set; }
        /// <summary>
        /// 左视觉图片地址
        /// </summary>
        public string img1 { get; set; }
        /// <summary>
        /// 右视觉图片地址
        /// </summary>
        public string img2 { get; set; }
        /// <summary>
        /// 系统配置
        /// </summary>
        public JsSysConfig Sys { get; set; }
    }

    public class JsSysConfig
    {
        /// <summary>
        /// 是否保存登录历史
        /// </summary>
        public bool IsSaveLogin { get; set; }
        /// <summary>
        /// 登录历史
        /// </summary>
        public List<string> SaveLogin { get; set; }
        /// <summary>
        /// 登录历史数量
        /// </summary>
        public int SaveLoginCount { get; set; }
        /// <summary>
        /// 开机启动
        /// </summary>
        public bool Powerboot { get; set; }
        /// <summary>
        /// 启动全屏
        /// </summary>
        public bool StartupFull { get; set; }
        /// <summary>
        /// 日志保存天数
        /// </summary>
        public int SaveLogDay { get; set; }
    }

    /// <summary>
    /// 设置组基础
    /// </summary>
    public abstract class SetGroupBase
    {
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 排序码
        /// </summary>
        public int Sort { get; set; }
        /// <summary>
        /// 是否选中
        /// </summary>
        public bool IsSelect { get; set; }
        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnabled { get; set; }
    }
}
